home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / KSLIB11.ARJ / DB.H < prev    next >
Text File  |  1991-11-01  |  1KB  |  42 lines

  1. #define MI    5
  2.  
  3. struct    DBfile {
  4.     int        rs;                            /* Record size (bytes)                */
  5.     int        rn;                            /* Current record number            */
  6.     int        nr;                            /* Number of records                */
  7.     void    *rec;                        /* Pointer to temporary record        */
  8.     FILE    *fp;                        /* Pointer to database file handle    */
  9.     FILE    *ifp;                        /* Pointer to index file handle        */
  10.     int        (*ifunc)(void *,void *);    /* Pointer to index function        */
  11.     int        inr;                        /* Number of records in index file    */
  12.     struct    DBfile *last;                /* Pointer to last structure        */
  13.     struct    DBfile *next;                /* Pointer to next structure        */
  14. };
  15.  
  16. typedef struct DBfile DBfile;
  17.  
  18. DBfile    *DBopen(char *,int,char *,int (*)());
  19. void    DBend(void);
  20. void    DBselect(DBfile *);
  21. int        DBindex(char *,int (*)(void *,void *));
  22. int        DBsetindex(int);
  23. DBfile    *DBclose(void);
  24. int        DBcmp(void *,void *);
  25. int        DBcopy(void *,void *);
  26. int        DBread(void *);
  27. int        DBgo(int);
  28. int        DBadd(void *);
  29. int        DBwrite(void *);
  30. int        DBreadn(int,void *);
  31. int        DBiread(int);
  32. int        DBiwrite(int,int);
  33. int        DBrecno(void);
  34. int        DBskip(int);
  35. int        DBdelete(void);
  36. int        DBfindfirst(void *);
  37. int        DBfindnext(void *);
  38. int        DBseekfirst(void *,int (*)());
  39. int        DBseeknext(void *,int (*)());
  40. int        DBtop(void);
  41. int        DBbot(void);
  42. int        DBvalid(void);